#ifndef __USER_ADC_H__
#define __USER_ADC_H__


#ifdef	__cplusplus
extern "C" {	/* allow C++ to use these headers */
#endif	/* __cplusplus */

#include "ingsoc.h"

#define AVE_NUM 8
#define INCLUDE_EXTREMUM 0

#define ADC_CHANNEL_BAT     ADC_CH_4

#define ADC_CHANNEL_ROL2     ADC_CH_7

#define ADC_CHANNEL_ROL6     ADC_CH_6

#define ADC_CHANNEL_ROR2     ADC_CH_0

#define ADC_CHANNEL_ROR6     ADC_CH_1


#define ADC_IO_INDEX_BAT     11

#define ADC_IO_INDEX_ROL2    14

#define ADC_IO_INDEX_ROL6    13

#define ADC_IO_INDEX_ROR2    7

#define ADC_IO_INDEX_ROR6    8

void setup_adc(void);

uint16_t adc_read(SADC_channelId channel);

#ifdef __cplusplus
} /* allow C++ to use these headers */
#endif	/* __cplusplus */

#endif
